<?php
require_once '../utils/common.php';
require_once '../Config.php';
checkUserValidate ();
$id = $_REQUEST ['id'];
$fatherid = $_REQUEST['fatherid'];
if ($id != - 1) {
	$con = mysql_connect ( host, username, password );
	if (! $con) {
		die ( 'Could not connect: ' . mysql_error () );
	}
	mysql_select_db ( db, $con );
	$sql = "set names utf8";
	mysql_query ( $sql );
	$sql = "select * from j_tab_next where id=" . $id;
	$result = mysql_query ( $sql );
	if ($row = mysql_fetch_array ( $result )) {
		$icon = ip . project . $row ['icon'];
		$name = $row ['name'];
		$link = $row ['link'];
	}
	mysql_close ( $con );
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理系统</title>
<link href="../CSS/form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../js/jquery-1.10.1.js"></script>
<script type="text/javascript">

</script>
</head>

<body>
	<fieldset>
		<legend>修改</legend>
		<form action="NextProcess.php" method="post" class="form"
			enctype="multipart/form-data">
			<input type="hidden" name="flag" value="update" />
			<input type="hidden" name="id" value="<?=$id?>" />
			<input type="hidden" name="fatherid" value="<?=$fatherid?>" />
			<ul>
				<li><label>图标:</label></li>
				<li><input type="file" name="icon" id="icon" class="txt"
					value="<?=$icon?>" /></li>
				<li><img style="width: 20px; height: 20px" src="<?=$icon?>"></img></li>
				<li><label>名字:</label></li>
				<li><input type="text" name="name" id="name" class="txt"
					value=<?=$name?> /></li>
				<li><label>链接:</label></li>
				<li><input type="text" name="link" id="link" class="txt"
					value="<?=$link?>" /></li>
				<li><input type="submit" value="修改" class="btn" /></li>

			</ul>
		</form>
	</fieldset>
</body>

</html>